import request from '@/utils/request'

/**
* 工艺明细表分页查询
* @param {查询条件} data
*/
export function listCksTechniqueDetails(query) {
  return request({
    url: 'business/CksTechniqueDetails/list',
    method: 'get',
    params: query,
  })
}

/**
* 新增工艺明细表
* @param data
*/
export function addCksTechniqueDetails(data) {
  return request({
    url: 'business/CksTechniqueDetails',
    method: 'post',
    data: data,
  })
}

/**
* 下发工艺配置给PLC
* @param data
*/
export function addCksTechniqueLog(data) {
  return request({
    url: 'business/CksTechniqueDetails/AddCksTechniqueLog',
    method: 'post',
    data: data,
  })
}



/**
* 修改工艺明细表
* @param data
*/
export function updateCksTechniqueDetails(data) {
  return request({
    url: 'business/CksTechniqueDetails',
    method: 'PUT',
    data: data,
  })
}
/**
* 获取工艺明细表详情
* @param {Id}
*/
export function getCksTechniqueDetails(id) {
  return request({
    url: 'business/CksTechniqueDetails/' + id,
    method: 'get'
  })
}
//同步当前工艺模板数据项
export function syncCksTechnique(data) {
  return request({
    url: 'business/CksTechniqueDetails/syncCksTechnique',
    method: 'post',
    data: data,
  })
}

//同步当前工艺模板数据项
export function updateConfigValues(data) {
  return request({
    url: 'business/CksTechniqueDetails/updateConfigValues',
    method: 'post',
    data: data,
  })
}

/**
* 删除工艺明细表
* @param {主键} pid
*/
export function delCksTechniqueDetails(pid) {
  return request({
    url: 'business/CksTechniqueDetails/delete/' + pid,
    method: 'delete'
  })
}
